from django.urls import path, re_path
from rest_framework.routers import DefaultRouter

from . import views

urlpatterns = [
    path('', views.ProductView.as_view()),
    re_path('(\d+)', views.ProductDetailView.as_view()),
]

routers = DefaultRouter()
routers.register('viewset', views.ProductViewSet, basename='products')
urlpatterns += routers.urls
